# --*--coding=utf-8 --*--
"""
CBS的请求类
"""


class RequestData(object):
    """
    通用请求实体类
    """

    def __init__(self, request_id):
        # 请求Id或者交业务Id
        self.req_id = request_id
        # 请求名称
        self.req_name = None
        # 请求接口名
        self.child_url = None
        # 请求方法
        self.req_method = None
        # 请求主体
        self.req_body = None
        # 响应主体
        self.res_body = None
        # 经办用户
        self.username = None
        # 请求数据
        self.req_data = None
        # 后置响应数据
        self.post_res_data = None
        # 代理报文响应主体
        self.cbcProxyMsg = None

    def set_req_name(self, request_name):
        """
        :param request_name:
        """
        self.req_name = request_name

    def set_child_url(self, child_url):
        """
        :param child_url:
        """
        self.child_url = child_url

    def set_req_method(self, request_method):
        """
        :param request_method:
        """
        self.req_method = request_method.lower()

    def set_req_body(self, request_body):
        """
        :param request_body:
        """
        self.req_body = request_body

    def set_res_body(self, response_body):
        """
        :param response_body:
        """
        self.res_body = response_body

    def set_username(self, username):
        """
        经办用户名
        :param username:
        """
        self.username = username

    def set_req_data(self, request_data):
        """
        :param request_data:
        """
        self.req_data = request_data

    def set_post_res_data(self, post_response_data):
        """
        :param post_response_data:
        """
        self.post_res_data = post_response_data

    def set_cbcProxyMsg(self, cbcProxyMsg):
        """
        :param cbcProxyMsg:
        """
        self.cbcProxyMsg = cbcProxyMsg
